function update() {
    /*只可以修改部分数据，只需要修改两张表。*/
    /*console.log( $ {petshow});*/
    /*这里序列化并输出。*/

    var data = {};
    // var id='<%=request.getAttribute("storeid")%>';
    // $("#Province").val('@Model.Province');
    // var dd='@Model.Province';



    // data["petid"] = '${petid}';/*?*/

    // data["petid"] = $("#petid").text();/*有用？？？可以。*/

    // data["petid"]=$("input[name='petid']").text();

    var checkempty = false;
    var arr = $('form').serializeArray();


    $.each(arr, function () {
        data [this.name] = this.value;
        if (this.value === "") {
            checkempty = true;
        }
    });
    alert(JSON.stringify(data));

    if (checkempty) {
        /*所以return不能写在，$.each下面？？？*/
        alert('不能为空！');
        return false;
    }

    $.ajax({
        url: "http://localhost:8080/Github_war_exploded/pet/modifyaction",
        method: "GET",
        data: data,
        success: function (datamsg) {
            alert(datamsg);
            window.location.href = "http://localhost:8080/Github_war_exploded/releasesuccess";
            /*是这个？？？*/
        }, error: function (msg) {
            alert('ajax error!');
        }
    });
}